


R=150
C=50e-6
T=1e-3
U=5
Ur=5
Uc=0

kmax=0.1/T;

for k=1:kmax
    Uc = (U*T+R*C*Uc)/(R*C+T);
    Ur = U-Uc;
    
    Uc_mas(k) = Uc;
end

plot(1:kmax,Uc_mas)